<?php

namespace app\common\validate;

use think\Validate;

class Login extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'page|页码'                 => 'require',
        'pageCount|页面数量'        => 'require',
        'mobile|手机号'             => 'require',
        'captcha|验证码'            => 'require',
        'passWord|密码'             => 'require',
        'confirmPassWord|确认密码'  => 'require',
        'realName|真实姓名'         => 'require',
        'job|职位'                  => 'require',
        'idCard|身份证号'           => 'require',
        'sex|性别'                  => 'require',
        'avatar|头像'               => 'require',
        'noticeId|消息编号'         => 'require',
        'content|投诉内容'          => 'require',
        'loginType|登录场景'        => 'require|in:1',
        'miniappLoginCode|微信Code' => 'require',
        'miniappMobileCode|手机号Code' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'register'         => ['mobile', 'passWord'],
        'login'            => ['loginType', 'miniappLoginCode'],
        'mobilelogin'      => ['mobile', 'captcha', 'passWord', 'confirmPassWord', 'realName', 'job', 'idCard', 'sex', 'avatar'],
        'noticeList'       => ['page', 'pageCount'],
        'noticeDetail'     => ['noticeId'],
        'complaint'        => ['content'],
        'accountRetrieval' => ['mobile', 'captcha', 'passWord', 'confirmPassWord'],
        'scoreLog'         => ['page', 'pageCount'],
    ];
}